package com.example.unisys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.unisys.entity.Notice;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Repository
public interface NoticeMapper extends BaseMapper<Notice> {

    public Integer insertSelective(Notice notice);

    public Integer update(Notice notice);

    public List<Map< String, Object >> getNoticeBySchool(@Param("main_school")String main_school, @Param("sub_school")String sub_school, @Param("start")int start, @Param("pagesize")int pagesize);

    public Integer getNoticeSum(@Param("main_school")String main_school,@Param("sub_school")String sub_school);

    public Integer delete(@Param("notice_id") int notice_id);

    public Notice getById(@Param("notice_id") int notice_id);

    List<Map<String, Object>> getNoticesWithType(HashMap<String, Object> hs);
}
